package com.shangcheng.orders.dao;


import com.shangcheng.orders.pojo.OrderItem;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

/****
 * @Author:admin
 * @Description:OrderItem的Dao
 * @Date 2019/6/14 0:12
 *****/
public interface OrderItemMapper extends Mapper<OrderItem> {
    @Select("SELECT* FROM tb_order_item WHERE username LIKE #{username}")
    List<OrderItem> selectByName(String username);

    @Select("SELECT* FROM tb_order_item WHERE sku_id LIKE #{skuId}")
    OrderItem selectById(Long skuId);

    @Delete("DELETE FROM tb_order_item WHERE username LIKE #{username}")
    int deleteByName(String username);

}
